package calendar;

import java.util.Random;
import java.util.Scanner;

public class test {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String str=sc.next();
        int index=6;
        Random random=new Random();
        StringBuffer stringBuffer=new StringBuffer();

        for (int i=0;i<index;i++) {
            int nextInt = random.nextInt(str.length());
            stringBuffer.append(str.charAt(nextInt));
        }
        System.out.println(stringBuffer);
    }
}
